package org.walkerljl.commons.image.group.enums;

/**
 * GroupCondition
 *
 * @author lijunlin
 */
public enum GroupCondition {

    ADDRESS(1),

    TIME_YEAR(2),

    TIME_MONTH(3),

    TIME_DAY(4);

    private int value;

    private GroupCondition(int value) {
        this.value = value;
    }

    public static GroupCondition parseType(int value) {
        if (value <= 0) {
            return null;
        }
        for (GroupCondition ele : GroupCondition.values()) {
            if (ele.getValue() == value) {
                return ele;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }
}
